import { GSprite } from "../../../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../../../common/ObjCreate";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { FontUtil } from "../../../../../common/font/FontUtil";
import { Language } from "../../../../../../extend/language/Language";
import { FilterConst } from "../../../../../component/gconst/FilterConst";
import { EliteMapStateCellRenderer } from "../EliteMapStateCellRenderer";
import { DataProvider } from "../../../../../../fl/data/DataProvider";
import { GlobalClass } from "../../../../../../com/mui/core/GlobalClass";
import { CutDataUtil } from "../../../../../common/tools/CutDataUtil";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
import { SecTimerView } from "../../../common/SecTimerView";
import { GTileList } from "../../../../../../com/mui/controls/GTileList";
type int = number;
//class GuildEliteGroupRightPart
    
    export  class GuildEliteGroupRightPart extends GSprite
    {
        constructor()
        {
            super();
            ObjCreate.createBg(0, 0, 209, 390, this);
            ObjCreate.createBg(0, -1, 212, 35, this, ImagesConst.RbListHeader);
            ObjCreate.createBg(10, 104, 192, 2, this, ImagesConst.SplitLine);
            this._bmFbxq = ObjCreate.createBitmap(null, 59, 5, this);
            var loc1=GlobalStyle.setTextFormatLeading(GlobalStyle.textFormat6, 5);
            loc1.font = FontUtil.stXingkaiName;
            loc1.size = 22;
            loc1.color = 16776960;
            this._floorBm = ObjCreate.createBitmap(null, 10, 39, this);
            this._floorText = ObjCreate.createGTextField(Language.getString(60602), 8, 34, 270, 35, this, loc1, true, false);
            loc1.color = GlobalStyle.color1Uint;
            loc1.size = 12;
            loc1.font = FontUtil.defaultName;
            loc1.align = flash.text.TextFormatAlign.LEFT;
            this._wofangrenshu = ObjCreate.createGTextField(Language.getStringByParam(60656, 0, 0), 10, 62, 200, 20, this, loc1, true, false);
            this._leftTime = ObjCreate.createSecTimeView(Language.getString(60657), 10, 82, 200, 20, this, loc1);
            this._leftTime.filters = [FilterConst.glowFilter];
            loc1 = GlobalStyle.setTextFormatLeading(GlobalStyle.textFormat6, 5);
            this._txtbm = ObjCreate.createBitmap(null, 10, 113, this);
            this._mapsList = ObjCreate.createTileList(15, 135, 190, 250, this);
            this._mapsList.columnWidth = 180;
            this._mapsList.rowHeight = 28;
            this._mapsList.setStyle("cellRenderer", EliteMapStateCellRenderer);
            this._dp = new DataProvider();
            this._mapsList.dataProvider = this._dp;
            return;
        }

        public onResLoaded(): void
        {
            this._bmFbxq.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildGroupText_fbxq);
            this._floorBm.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildGroupText_dqcs);
            this._floorText.x = this._floorBm.x + this._floorBm.width;
            this._txtbm.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildGroupText_bcjsxq);
            return;
        }

        public updateLeftTime(arg1: int): void
        {
            this._leftTime.setParse(Language.getString(60657));
            this._leftTime.setLeftTime(arg1);
            return;
        }

        public updatePreLeftTime(arg1: int): void
        {
            this._leftTime.setParse(Language.getString(60689));
            this._leftTime.setLeftTime(arg1);
            return;
        }

        public updatePlayerNum(arg1: int, arg2: int): void
        {
            this._wofangrenshu.htmlText = Language.getStringByParam(60656, arg1, arg2);
            return;
        }

        public updateMapsStatus(arg1: Array<any>): void
        {
            this._dp.removeAll();
            this._dp.addItems(arg1);
            this._mapsList.dataProvider = this._dp;
            return;
        }

        public updateRewards(arg1: Array<any>): void
        {
            return;
        }

        public updateFloor(arg1: int): void
        {
            this._floor = arg1;
            this.updatefloortxt();
            return;
        }

        /* internal  */updatefloortxt(): void
        {
            this._floorText.htmlText = Language.getStringByParam(60608, CutDataUtil.replaceNum2CHStr(String(this._floor)));
            return;
        }

        /* internal */ /* var */_bmFbxq: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_floorBm: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_floorText: GTextFiled;

        /* internal */ /* var */_wofangrenshu: GTextFiled;

        /* internal */ /* var */_leftTime: SecTimerView;

        /* internal */ /* var */_dp: DataProvider;

        /* internal */ /* var */_mapsList: GTileList;

        /* internal */ /* var */_txtbm: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_floor: int;
    }
